#pragma once
#ifndef HERO_H
#define HERO_H
#include <raylib.h>
#include "Sprite.h"
#include "string"

class Hero:public sprite
{
    public :
        Vector2 position;
        Vector2 getPosition();
        vector<Rectangle> actionFrames;
        virtual vector<float> getCollisionBox();
        Rectangle getRectangle();
        float width=27.0f;
        float height=40.0f;
        int currentFrame = 0;
        float originStep=150.0f*deltaTime;
        float step=deltaTime*Velocity;
        Hero(string imagePath) {
            vector<Rectangle> frames;
            frames.push_back({0.0f, 0.0f, 30.0f, 30.0f});
            this->actionFrames = frames;
            chara_texture=initTexture(imagePath);
            x=0.0f;
            y=0.0f;
            position={x,y};
        }
        ~Hero(){}
        Texture chara_texture;
        Texture initTexture(string imgPath);
        void changeDirection(int direction);
        void hero_thread(int id);
        void setInitialPosition(float x,float y);
        
};


#endif